<template>
  <Card>
    <Tabs type="card" v-model="munname" @on-click="changeTab">
      <TabPane name="name1" label="对话渠道配置">
        <channelConfiguration ref="channelConfiguration"></channelConfiguration>
      </TabPane>
      <TabPane name="name2" label="基建配置">
        <infrastructure ref="infrastructure"></infrastructure>
      </TabPane>
      <TabPane name="name3" label="渠道费用录入类型">
        <channelType ref="channeltype"></channelType>
      </TabPane>
    </Tabs>
  </Card>
</template>
<script>
import channelConfiguration from "./components/channelConfiguration.vue";
import infrastructure from "./components/infrastructure.vue";
import channelType from "./components/channelType.vue";
export default {
  name: "channelList",
  components: {
    channelConfiguration,
    infrastructure,
    channelType,
  },
  data() {
    return {
      munname: "name1",
    };
  },
  mounted() {
    this.$refs.channelConfiguration.initial(this.munname);
  },
  methods: {
    changeTab(e) {
      if (e == "name1") {
        this.$refs.channelConfiguration.initial(e);
      } else if (e == "name2") {
        this.$refs.infrastructure.initial(e);
      } else {
        this.$refs.channeltype.initial(e);
      }
    },
  },
};
</script>
